package controllers

import (
	"github.com/astaxie/beego"
)


type MainController struct {
	beego.Controller
}


//得到初始地图
func (c *MainController) GetData() {
	//c.Data["longitude"] = aa[9:]
	//c.Data["latitude"] = aa[:9]
	c.TplName = "findpoint.html"
}

//func (c *MainController) optionsAllowCross() {
//	c.Ctx.ResponseWriter.Header().Set("Access-Control-Allow-Origin", "http://localhost:14000")       //允许访问源
//	c.Ctx.ResponseWriter.Header().Set("Access-Control-Allow-Methods", "POST, GET, PUT, OPTIONS")    //允许post访问
//	c.Ctx.ResponseWriter.Header().Set("Access-Control-Allow-Headers", "Content-Type,Authorization") //header的类型
//	c.Ctx.ResponseWriter.Header().Set("Access-Control-Max-Age", "1728000")
//	c.Ctx.ResponseWriter.Header().Set("Access-Control-Allow-Credentials", "true")
//	c.Ctx.ResponseWriter.Header().Set("content-type", "application/json") //返回数据格式是json
//}


//func (c *MainController) Options() {
//	c.optionsAllowCross() //允许跨域
//	c.Data["json"] = map[string]interface{}{"status": 200, "message": "ok", "moreinfo": ""}
//	c.ServeJSON()
//}











